//
//  Attention.m
//  SDDataTest
//
//  Created by sodao on 12-9-20.
//  Copyright (c) 2012年 sodao. All rights reserved.
//

#import "Attention.h"

@implementation Attention

@synthesize owner;
@synthesize attentionPersons;
@synthesize count;
@synthesize dynamic;


- (void)encodeWithCoder:(NSCoder *)aCoder{
    [super encodeWithCoder:aCoder];
    [aCoder encodeObject:self.owner forKey:kEncodeAttention_owner];
    [aCoder encodeObject:self.attentionPersons forKey:kEncodeAttention_attPerson];
    [aCoder encodeInt32:self.count forKey:kEncodeAttention_count];
    [aCoder encodeObject:self.dynamic forKey:kEncodeAttention_dynamic];
}
- (id)initWithCoder:(NSCoder *)decoder {
    if (self = [super initWithCoder:decoder]) {
        self.owner = [decoder decodeObjectForKey:kEncodeAttention_owner];
        self.attentionPersons = [decoder decodeObjectForKey:kEncodeAttention_attPerson];
        self.count = [decoder decodeInt32ForKey:kEncodeAttention_count];
        self.dynamic = [decoder decodeObjectForKey:kEncodeAttention_dynamic];
    }
    return self;
}
-(id)initWithDictionary:(NSDictionary*)dictionary{
    self = [super initWithDictionary:dictionary];
    if (self) {
        
    }
    return self;
}
-(void)dealloc{
    [super dealloc];
    if (self.owner) {
        [self.owner release];
    }
    if (self.attentionPersons) {
        [self.attentionPersons removeAllObjects];
        [self.attentionPersons release];
    }
    if (self.dynamic) {
        [self.dynamic release];
    }
}






@end
